---
import getSortedPosts from "@utils/getSortedPosts";
import { getPostByStatus } from "./[status]/[page].astro";
import getPagination from "@utils/getPagination";
import Posts from "@layouts/Posts.astro";

const status = "all";
const posts = await getPostByStatus(status);
const sortedPosts = getSortedPosts(posts);

const pagination = getPagination({
  posts: sortedPosts,
  page: 1,
  isIndex: true,
});
---

<Posts {...pagination} status={status} />
